# 构造函数
def now_days(input_year,input_month,input_day):
    year = int(input_year)
    month = int(input_month)
    day = int(input_day)
    # 引用系统函数(时间)
    import datetime

    yuandan = datetime.datetime(year,1,1)
    now = datetime.datetime(year,month,day)
    
    print((now - yuandan).days + 1)
    return print
print("请输入日期(年月日用空格隔开):")
input_year,input_month,input_day = map(int,input().split(" "))
result = now_days(input_year,input_month,input_day)
print(result)